/*
 * @Author: thl
 * @Date: 2023-06-27 18:38:58
 * @FilePath: \cw_web\gl\src\views\dataBoard\components\theCrowdSummary.jsx
 * @Descripttion: 
 */
import React from "react";
import "@/views/dataBoard/style/style.less";
import _ from 'lodash'
import TheLineChart from "@/views/dataBoard/components/formChart.jsx";
class TheCrowdSummary extends React.Component {
  state = {
  }
  chart = React.createRef()
  componentDidUpdate(prevProps, prevState) {
    if (prevProps.aHistogram != this.props.aHistogram) {
      this.chart.current.set({...this.props.aHistogram, legend: this.props.legend })
    }
  }

  render() {
    const { lineXData, lineYData, legend } = this.state
    return <div className="chart-box">

      <TheLineChart
        ref={this.chart}
        name='平台统计'
        lineXData={lineXData}
        lineYData={lineYData}
        legend={legend}
      />
    </div>
  }
}

export default TheCrowdSummary;
